package com.yzt.dynamicmodule.dialog;

import android.view.View;

import com.yzt.zhuju.dialog.CenterBaseDialog;
import com.yzt.dynamicmodule.R;

/**
 * 作者：bobwang
 * 创建时间：2023-11-20 23:21:16
 * 描述：
 */
public class GameUserLessDialog extends CenterBaseDialog {
    @Override
    public int getLayoutRes() {
        return R.layout.dialog_game_user_less;
    }

    @Override
    public void bindView(View v) {

        findViewById(R.id.tv_invite).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onController(1);
            }
        });
        findViewById(R.id.tv_wait_user).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onController(2);
            }
        });
        findViewById(R.id.tv_cancel_game).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View v) {
                listener.onController(3);
            }
        });
    }

    private OnSelectOnClickListener listener;

    public void setListener(OnSelectOnClickListener listener) {
        this.listener = listener;
    }

    public interface OnSelectOnClickListener {

        void onController(int type);
    }
}
